Skip to content

Extra deploy for additional manifests#293

Open
philippeckel wants to merge 4 commits into
meilisearch:mainfrom
philippeckel:extra-deploy
Open

Extra deploy for additional manifests#293
philippeckel wants to merge 4 commits into
meilisearch:mainfrom
philippeckel:extra-deploy

Conversation

@philippeckel
Copy link
Copy Markdown

@philippeckel philippeckel commented Jan 12, 2026

Pull Request

Related issue

Fixes #292

What does this PR do?

  • Add support for deploying additional Kubernetes resources alongside Meilisearch through an extraDeploy configuration option in values.yaml. This feature would allow users to define custom Kubernetes manifests (ConfigMaps, Secrets, Services, Deployments, etc.) that get deployed as part of the Helm release without needing to fork or modify the chart.

PR checklist

Please check if your PR fulfills the following requirements:

  • Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
  • Have you read the contributing guidelines?
  • Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!

Summary by CodeRabbit

  • New Features

    • Support for deploying extra custom resources with the release.
    • New configurable options: extra deploys list, init containers, priority class, and service account token mounting.
    • Service monitor can now be scoped with a configurable namespace.
  • Updates

    • Upgraded Meilisearch image to v1.31.0.
    • Chart version and metadata updated to 0.20.0; docs footer regenerated.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 12, 2026

📝 Walkthrough

Walkthrough

Adds a new extraDeploy values key and a Helm template to render user-provided Kubernetes manifests alongside Meilisearch; updates chart README metadata and documents new configurable fields and defaults.

Changes

Cohort / File(s) Summary
Documentation & Metadata
charts/meilisearch/README.md
Bumped chart/version badges (Version: 0.2.10.20.0, AppVersion: v1.2.0v1.31.0); documented new configurable fields (including extraDeploy, initContainers, priorityClassName, serviceAccount.automountServiceAccountToken, serviceMonitor.namespace); adjusted persistence/image defaults; updated helm-docs footer version.
Template Implementation
charts/meilisearch/templates/extra-deploy.yaml
New template that iterates over .Values.extraDeploy, emits a YAML document separator per item, and renders each entry via tpl (supports string or object entries rendered with toYaml).
Configuration Values
charts/meilisearch/values.yaml
Added extraDeploy: [] (under serviceMonitor area per diff) to allow users to specify additional Kubernetes resources to be deployed with the chart.

Sequence Diagram(s)

(omitted — changes are template + docs and do not introduce multi-component runtime control flow)

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

Suggested reviewers

  • brunoocasali
  • curquiza

Poem

🐰 I stitched an extraDeploy today,
Manifests hop out to play.
Values set, templates rhyme,
Charts grow nimble, one deploy at a time.
The rabbit cheers — release hooray! 🎉

🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Changes include README badge updates and helm-docs version updates, which fall outside the scope of implementing the extraDeploy feature specified in #292. Remove README.md changes (version badges and helm-docs updates) unrelated to the extraDeploy implementation, or include them in a separate documentation maintenance PR.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Extra deploy for additional manifests' directly reflects the primary change—adding support for deploying additional Kubernetes resources via the extraDeploy feature.
Linked Issues check ✅ Passed All coding requirements from issue #292 are met: extraDeploy array added to values.yaml, dedicated template file (extra-deploy.yaml) created with range loop implementation, and support for arbitrary Kubernetes manifests.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


📜 Recent review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 06e7210 and 81d5a2d.

📒 Files selected for processing (1)
  • charts/meilisearch/values.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • charts/meilisearch/values.yaml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In @charts/meilisearch/templates/extra-deploy.yaml:
- Around line 1-8: The template references the wrong value name and injects
extra leading spaces into rendered manifests; change .Values.extraDeploy to
.Values.extraDeploys and remove the leading spaces before the tpl calls so the
lines reading tpl . $ and tpl (. | toYaml) $ are not indented (keep the '---'
separator line intact), ensuring the range over the correct values key and that
tpl output is emitted without unwanted leading whitespace.

In @charts/meilisearch/values.yaml:
- Around line 182-183: The Helm values key is misnamed: values.yaml defines
extraDeploys (plural) but the chart template extra-deploy.yaml reads
.Values.extraDeploy (singular), so the template never receives the data; fix by
either renaming the values key from extraDeploys to extraDeploy to match the
template, or update the template (extra-deploy.yaml) to reference
.Values.extraDeploys (plural) wherever used; ensure the symbol names
(extraDeploys or extraDeploy) are consistent between values and template.
📜 Review details

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b39e9c3 and 06e7210.

📒 Files selected for processing (3)
  • charts/meilisearch/README.md
  • charts/meilisearch/templates/extra-deploy.yaml
  • charts/meilisearch/values.yaml
🧰 Additional context used
🪛 markdownlint-cli2 (0.18.1)
charts/meilisearch/README.md

120-120: Bare URL used

(MD034, no-bare-urls)

🪛 YAMLlint (1.37.1)
charts/meilisearch/templates/extra-deploy.yaml

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

🔇 Additional comments (2)
charts/meilisearch/README.md (2)

66-66: Documentation reflects extraDeploys (plural).

This documentation matches values.yaml but not the template. After resolving the naming mismatch between extraDeploys and extraDeploy, regenerate this README using helm-docs to ensure consistency.


5-5: Documentation updates look good.

The helm-docs regeneration properly captures the new and updated chart values including version bumps and new configuration options.

Also applies to: 71-71, 78-78, 89-89, 99-99, 111-111, 114-114, 119-119, 121-121, 133-133

Comment on lines +1 to +8
{{- range .Values.extraDeploy }}
---
{{- if typeIs "string" . }}
{{ tpl . $ }}
{{- else }}
{{ tpl (. | toYaml) $ }}
{{- end }}
{{- end }}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Fix whitespace handling to avoid malformed YAML output.

Two issues with this template:

  1. Naming mismatch: References .Values.extraDeploy but values.yaml defines extraDeploys (covered in values.yaml comment).

  2. Leading whitespace: Lines 4 and 6 have leading spaces that will be included in the rendered output, causing indentation issues in the generated manifests.

🐛 Proposed fix
 {{- range .Values.extraDeploy }}
 ---
-{{- if typeIs "string" . }}
-    {{ tpl . $ }}
-{{- else }}
-    {{ tpl (. | toYaml) $ }}
-{{- end }}
+{{ if typeIs "string" . }}
+{{ tpl . $ }}
+{{- else }}
+{{ tpl (toYaml .) $ }}
+{{- end }}
 {{- end }}

Note: The YAMLlint syntax error is a false positive since this is a Helm template, not a standalone YAML file.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{{- range .Values.extraDeploy }}
---
{{- if typeIs "string" . }}
{{ tpl . $ }}
{{- else }}
{{ tpl (. | toYaml) $ }}
{{- end }}
{{- end }}
{{- range .Values.extraDeploy }}
---
{{ if typeIs "string" . }}
{{ tpl . $ }}
{{- else }}
{{ tpl (toYaml .) $ }}
{{- end }}
{{- end }}
🧰 Tools
🪛 YAMLlint (1.37.1)

[error] 1-1: syntax error: expected the node content, but found '-'

(syntax)

🤖 Prompt for AI Agents
In @charts/meilisearch/templates/extra-deploy.yaml around lines 1 - 8, The
template references the wrong value name and injects extra leading spaces into
rendered manifests; change .Values.extraDeploy to .Values.extraDeploys and
remove the leading spaces before the tpl calls so the lines reading tpl . $ and
tpl (. | toYaml) $ are not indented (keep the '---' separator line intact),
ensuring the range over the correct values key and that tpl output is emitted
without unwanted leading whitespace.

Comment thread charts/meilisearch/values.yaml Outdated
@brunoocasali
Copy link
Copy Markdown
Member

Hi there, can you update the chart version? This way we can proceed with the merge :)

| envFrom | list | `[]` | Additional environment variables from ConfigMap or secrets |
| environment.MEILI_ENV | string | `"development"` | Sets the environment. Either **production** or **development** |
| environment.MEILI_NO_ANALYTICS | bool | `true` | Deactivates analytics |
| extraDeploys | list | `[]` | Extra objects to deploy with the release |
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| extraDeploys | list | `[]` | Extra objects to deploy with the release |
| extraDeploy | list | `[]` | Extra objects to deploy with the release |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or maybe we should keep extraDeploys everywhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add option for deploying extra objects

2 participants